import {
  Module,
  VuexModule,
  Mutation,
  getModule,
} from "vuex-module-decorators";
import store from "@/store";

@Module({ dynamic: true, store, namespaced: true, name: "bgColor" })
class bgcolor extends VuexModule {
  backgroundColor = "#409EFF";

  get getbgcolor(): string {
    return this.backgroundColor;
  }

  @Mutation
  changeBgcolor(color: string): void {
    this.backgroundColor = color;
  }
}

const bgColorModule = getModule(bgcolor);

export default bgColorModule;
